package com.cn.jvm;

/**
 * @author hels
 * @version 1.0
 * @date 2021/11/22 16:31
 */
public class C01_TestPlusPlus {

    public static void main(String[] args) {
        int a = 0;
        int b = 0;
        for (int i = 0; i < 99; i++) {
            a = a++;
            b = a++;
        }
        System.out.println(a);
        System.out.println(b);
        // 结果是  99  98
        /*
        // 关键字节码
        L3
       FRAME APPEND [I I I]
        ILOAD 3
        BIPUSH 99
        IF_ICMPGE L4
       L5
        LINENUMBER 14 L5
        ILOAD 1     -- the operand stack load int from the local variable
        IINC 1 1    -- 将局部变量表index为1的局部变量做+1操作
        ISTORE 1    -- Store long (from the operand stack) into local variable of the current frame
       L6
        LINENUMBER 15 L6
        ILOAD 1
        IINC 1 1
        ISTORE 2
       L7
        LINENUMBER 13 L7
        IINC 3 1
        GOTO L3
         */
    }
}
